The invention relates to duplexed computer systems and especially to an arrangement with which two computer units can control data on the same disk drive.
In fault-tolerant systems that are used for example in switching centres, it is previously known to write data into two separate disk drives. It is also previously known to duplex computers so that when one computer unit fails, the other computer may continue the operation. In such a system, the active unit controls both disk drives. The passive unit is either in reserve or faulty, but it does not usually control the disk drives. It is also previously known to store in the main memory of the computer such areas of the disk drive that were read last, since it is likely that at least some of these areas (for example directories) must be read again soon.
With reference to FIG. 1, duplexed computers are usually arranged in such a way that only one (e.g. 10) of the computers 10 and 20 uses a disk drive 14 and/or a disk drive 24. The other computer (in this case 20) is then in reserve or faulty. A first disk drive bus 15 connects both computer units and the first disk drive 14. Correspondingly, a second disk drive bus 25 connects both computer units and the second disk drive 24. FIG. 1 shows an embodiment where each computer unit 10 and 20 comprises two disk drive controllers 13a and 13b, and 23a and 23b, respectively. Alternatively, each computer unit 10 and 20 might comprise one disk drive controller having two separate interfaces to the disk drive buses 15 and 25. The disk drive buses 15 and 25 may be for example SCSI (Small Computer Systems Interface) buses and the disk drives 14 and 24 may correspondingly be disk drives with SCSI interfaces. FIG. 1 also shows a bidirectional message bus 30 connecting the computers 10 and 20. Via the message bus 30 the computers 10 and 20 interchange maintenance messages, for example they inquire about each other""s condition etc.
The system of FIG. 1 is shown with two disk drives 14 and 24 since in duplexed systems the disk drives are usually also duplexed. In this exemplary case, the disk drive buses have also been duplexed. As far as the invention is concerned, the disk drives 14 and 24 could also be connected to a common disk drive bus 15 or 25. However, the invention relates to controlling disk drives regardless of any other disk drives that the system may comprise. The number of disk drives and disk drive buses is therefore not essential to the invention.
Caching the data of the disk drive 14 in the main memory 12 of one computer 10 constitutes technology that is known to a person skilled in the art. The caching is based on the empirical observation that when a disk task is performed to some part of the disk drive 14, it is likely that another disk task is performed relatively soon to the same part. Therefore it is preferable to store in the main memory 12 the data corresponding to some of the most recently used areas of the disk drive 14. For the purpose of caching a disk drive, a certain area is usually reserved from the main memory 12. Alternatively, the disk drive controllers 13a and 13b may contain a separate cache memory.
A problem occurs with the use of duplexed computers each of which is to be provided with the possibility of using at least one disk drive 14 and 24 while the operation is expedited by caching the disk drive in the main memories 12 and 22 of the computers 10 and 20. If one computer unit (e.g. 10) modifies the data on the disk drive 14, the other computer unit (in this case 20) is not necessarily aware of it. If this computer 20 relies on the cached data in its main memory without reading the recently updated data from the disk drive 14, the system gets confused. Due to fault-tolerance, the computer units 10 and 20 have separate main memories, so that the computers 10 and 20 cannot write directly into each other""s main memories which areas in the disk drive 14 they have changed.
On the basis of the above, the object of the invention is to provide a method and a system with which two computer units can cache data in a shared disk drive in a reliable manner. The aims of the invention are achieved with methods and systems that are characterized by what is disclosed in the independent claims. The preferred embodiments are set forth in dependent claims.
The invention is based on the idea that a computer unit desiring to use a disk drive makes sure that another computer does not use the disk drive simultaneously, whereafter the computer checks if the other computer has modified any of the data in the disk drive. If the data in the disk drive has been changed, the cached data corresponding to this data is erased from the main memory. After this, a disk task is performed and the other computer unit is informed of the changed data in the disk drive.
The method and system according to the invention have the primary advantage that shared disk data can be controlled from two computers so that data can still be cached in the main memories of the computers. Also, the invention only requires few additions to the disk control software in order to be realized. The equipment does not usually have to be altered, considering the changes that would be required in any case by the duplexing of the computer system.